package com.idealighter.game.gamerecord.handler;

import com.google.inject.Inject;

import com.idealighter.game.core.annotation.ReqMsgHandler;
import com.idealighter.game.gamerecord.manage.GameRecordMgr;
import com.idealighter.game.gamerecord.message.ReqGameBillMsg;
import com.idealighter.game.message.ModuleMsgIdConstant;
import com.idealighter.game.message.core.ReqMessage;
import com.idealighter.game.message.core.ResMessage;
import com.idealighter.game.player.struct.Player;
import com.idealighter.game.server.handler.ReqMessageHandler;

@ReqMsgHandler(ModuleMsgIdConstant.Group.GAME_BILL)
public class ReqGameBillHandler implements ReqMessageHandler {

  @Inject
  private GameRecordMgr gameRecordMgr;

  @Override
  public ResMessage action(Player player, ReqMessage message) {
    ReqGameBillMsg msg = (ReqGameBillMsg) message;

    return gameRecordMgr.resGameBill(player, msg.getRoomId());
  }

}
